{extend name="base" /}
{block name="content"}
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>系统</span>
            <span class="icon-angle-right"></span>
            <span>分销管理</span>
            <span class="icon-angle-right"></span>
            <span>商家详情</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <div class="m-form">
                <form class="layui-form" id="j_form">
                    <table class="m-table">
                        <thead>
                        <tr>
                            <th colspan="4">商家详情</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td width="10%"><label>商家名称</label></td>
                            <td width="35%">{$data.business_name}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>所属用户</label></td>
                            <td width="35%">{$data.member_name}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>商家图标</label></td>
                            <td width="35%"><img src="{$data.business_icon_url}" alt="" style="display: block; width: 50px; height: 50px;" /></td>
                        </tr>
                        <tr>
                            <td width="10%"><label>营业时间</label></td>
                            <td width="35%">{$data.business_hours}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>商家地址</label></td>
                            <td width="35%">{$data.business_address}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>客服热线</label></td>
                            <td width="35%">{$data.business_hotline}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>商家广告图片</label></td>
                            <td width="35%">{$data.business_advertising_picture}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>商家环境</label></td>
                            <td width="35%">{$data.business_ambient}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>商家简介</label></td>
                            <td width="35%">{$data.business_introduce}</td>
                        </tr>
                        <tr>
                            <td width="10%"><label>审核状态</label></td>
                            <td width="35%">{$data.business_status_txt}</td>
                        </tr>


                    </table>


                </form>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}
<script>
    $(function(){
        $('.m-order-action a').on('click', function(){
            var id              = $(this).parent().attr('data-id');
            var order_status    = $(this).attr('data-order-status');
            var pay_status      = $(this).attr('data-pay-status');
            var shipping_status = $(this).attr('data-shipping-status');
            var status = {
                id: id
            };
            if (typeof(order_status) !== "undefined") {
                status.order_status = order_status;
            }
            if (typeof(pay_status) !== "undefined") {
                status.pay_status = pay_status;
            }
            if (typeof(shipping_status) !== "undefined") {
                status.shipping_status = shipping_status;
            }

            //确认收货
            if(shipping_status=='1' || shipping_status==2){
                status.wl_title =  $("input[name='wl_title']").val();
                status.wl_number = $("input[name='wl_number']").val();
            }


            //询问框
            layer.confirm('您确定要执行此操作吗？', {
                btn: ['确定', '取消']
            }, function(){
                $.post('{:url("orderAction")}', status, function(ret){
                    if (ret.status == 0) {
                        dialog.success(ret.message, function(){
                            window.location.reload();
                        });
                    } else {
                        dialog.error(ret.message);
                    }
                }, 'json');
            }, function(){

            });
        });
    })
</script>
{/block}